import {defaultCommodityFormData} from '@/views/main/commodity/config/default'

//分类界面配置
export const commodityContentConfig = {
  table: 'commodity',
  title: '农品',
  defaultData: defaultCommodityFormData,
  pageConfig: {
    showAdd: true
  },
  top: {
    title: '农品列表',
    subTitle: '用户看到的农品',
  },
  tableArr: [
    {
      label: '名称',
      prop: 'name'
    },
    {
      label: '描述',
      prop: 'description'
    },
    {
      label: '展示图片',
      prop: 'img_src',
      type: 'image'
    },
    {
      label: '价格',
      prop: 'price',
      width: '120'
    },
    {
      label: '单位',
      prop: 'unit',
      width: '120'
    },
    {
      label: '库存',
      prop: 'count',
      width: '120'
    },
    {
      label: '状态',
      prop: 'status',
      type: 'status',
      itemProps: {
        success: '在售',
        failed: '停售'
      },
      width: '120'
    },
    {
      label: '操作',
      align: 'center',
      type: 'action',
      itemProps: {
        actions: ['edit', 'delete', 'editDetail'],
      },
      width: '250'
    }
  ]
}
